package com.hz.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hz.control.UserControl;

public class StunumIsExists extends HttpServlet {
	private static final long serialVersionUID = 1L;

  @Override
  protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String name = request.getParameter("uname");
    //System.out.println(name);
    PrintWriter out = response.getWriter();
    if (UserControl.isExists(name)) {
      out.print("1");
    } else {
      out.print("0");
    }
  }

  
}
